const dbserver = require('../dao/dbSever')
//用户搜索
exports.searchUser = (req, res) => {
    let name = req.body.name;
    dbserver.searchUser(name, res)
}
//判断是否为好友
exports.isFriend = (req, res) => {
    let { uid, fid } = req.body;
    dbserver.isFriend(uid, fid, res)
}
//群搜索
exports.searchGroup = (req, res) => {
    let name = req.body.name;
    dbserver.searchUser(name, res)
}
//判断是否在群里
exports.isInGroup = (req, res) => {
    let { uid, gid } = req.body;
    dbserver.isFriend(uid, gid, res)
}